package com.uns.um.ep.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class DataBaseManager {

	private DataBaseHelper helper;
	private SQLiteDatabase db;

	public DataBaseManager(Context context) {
		this.helper = new DataBaseHelper(context);
		this.db = helper.getWritableDatabase();
	}

	public void insertCity(String city,String code) {
		String sql = "insert into " + DataBaseHelper.TABLE_NAME + " (";
		sql += DataBaseHelper.CC_CITY + ",";
		sql += DataBaseHelper.CC_CODE + ") VALUES(";
		sql += " '" + city + "' ," + " '" + code + "');";
		System.out.println(">>>>>insert:" + sql);
		db.execSQL(sql);
	}
}
